

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="adminmain" />
        <title>SMF Administration - Admin Account</title>
    </head>
    <body>
	
		<div class="body">

			<h1>Admin Account</h1>

			<br>

			<g:if test="${flash.message}">
				<div class="message">${flash.message}</div>
			</g:if>
			
			<g:hasErrors bean="${currentUser}">
				<div class="errors">
					<g:renderErrors bean="${currentUser}" as="list" />
				</div>
            </g:hasErrors>

			
			<table>
				<tr>
					<td>
					
						<g:form controller="admin" action="updateEmail">
					
							<table>  

								<tr class="prop">
									<td valign="top" class="name">login:</td>
									<td valign="top" class="value">${currentUser.userName}</td>
								</tr>

								<tr class="prop">
									<td valign="top" class="name">email:</td>
									<td valign="top" class="value">
										<g:textField name="email" 
													 size="30"
													 value="${currentUser.email}" />
									</td>
								</tr>
								
								<tr class="prop">
									<td></td>
									<td valign="top" class="value">
										<input type="hidden" name="id" value="${currentUser?.id}" />
										<input type="submit" value="update email"/>
									</td>
								</tr>
								
							</table>
						
						</g:form>
						
					</td>
					<td>

						<g:form controller="admin" action="updatePassword">
						
							<table>  

								<tr class="prop">
									<td valign="top" class="name">old password:</td>
									<td valign="top" class="value">
										<input type="password" 
											   name="oldPassword" 
											   size="20"/>
									</td>
								</tr>

								<tr class="prop">
									<td valign="top" class="name">new password:</td>
									<td valign="top" class="value">
										<input type="password" 
											   name="newPassword1" 
											   size="20"/>
									</td>
								</tr>

								<tr class="prop">
									<td valign="top" class="name">retype new password:</td>
									<td valign="top" class="value">
										<input type="password" 
											   name="newPassword2" 
											   size="20"/>
									</td>
								</tr>

								<tr class="prop">
									<td></td>
									<td valign="top" class="value">
										<input type="hidden" name="id" value="${currentUser?.id}" />
										<input type="submit" value="update password"/>
									</td>
								</tr>	

							</table>
						
						</g:form>
											
					</td>
					
				</tr>
			</table>


		</div>
	        
    </body>
</html>
